home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / zindent7.zip / ZINUSER.INC < prev    next >
Encoding:
Text File  |  1987-03-30  |  6.2 KB  |  221 lines

  1.  
  2.  
  3. (*******************************************************************)
  4. (*                                                                 *)
  5. (* Include File                                                    *)
  6. (* System User Entry,  v. 0800am, sun, 28.Mar.87, Glen Ellis       *)
  7. (*                                                                 *)
  8. (*******************************************************************)
  9.  
  10.  
  11. (* *)
  12. (*
  13. (* purpose:
  14. (*     accept user data as if from commandline.
  15. (*     operates as if for single source file.
  16. (*     if no filename entry,
  17. (*           then enable documentation
  18. (*
  19. (* *)
  20.  
  21.  
  22.  
  23. (*---------------------------------------------------------------*)
  24.  
  25. begin (* INCLUDE *)
  26.  
  27.    (*---> Header *)
  28.    pClearScreen; (* SysScr.inc *)
  29.  
  30.    (*-----------------------------------------------------------------*)
  31.    (* Apple IIe with CPM v.2.23, "60K", has funny clear screen bug.   *)
  32.    (* Mod for CP/M system file is available from author,              *)
  33.    (* but so is the simple work-around procedure "pClearScreen".      *)
  34.    (*                                                                 *)
  35.    (* other bugs from author:                                         *)
  36.    (* Apple CPM with Sider Hard Drive system (modified CP/M ) has bug.*)
  37.    (* Mod for CPM.SYS is available to correct I/O problem             *)
  38.    (*     CP/M 2.23 Apple/CPM version, for Reader and Punch devices.  *)
  39.    (*-----------------------------------------------------------------*)
  40.  
  41.    gotoxy(03,05);
  42.    writeln('-------------------------');
  43.    gotoxy(03,06);
  44.    writeln('System User Input Module ');
  45.  
  46.    (*---> #1 parameter *)
  47.  
  48.    IF (SysCmdUser) and (SysCmdUserFile) then (* fetch it *)
  49.    begin
  50.  
  51.       SysInFileName := ' ';
  52.  
  53.       (* force user filename entry *)
  54.       REPEAT
  55.          
  56.          gotoxy(03,08);
  57.          writeln
  58.          ('Enter Source Filename or "?" for Documentation screens.');
  59.          gotoxy(03,09);
  60.          write('   Enter : '); readln(SysInfileName);
  61.  
  62.          (* accept <CR> entry for 'documentation' selection *)
  63.          if (length(SysInFileName) = 0 )
  64.             then SysInFileName := '?';
  65.  
  66.       UNTIL SysInFileName > ' ' ;
  67.  
  68.       IF (SysInFileName = '?') then
  69.       begin
  70.          SysCmdUser := false;
  71.          SysInFileName := 'Documentation';
  72.          (* always for single file mode *)
  73.       end;
  74.  
  75.       (* Single file mode defaults *)
  76.       SysInSource[1] := SysInFilename;
  77.       SysInSourceCnt := 0;
  78.       SysInSourceMax := 1; (* only for compatibility *)
  79.  
  80.    end; (* IF (SysCmdUser) and (SysCmdUserFile) then (* fetch it *)
  81.  
  82.  
  83.    (*--------------------------------*)
  84.  
  85.    IF (SysCmdUser) and (SysCmdUserParm) then
  86.    begin  (* SysCmdUser *)
  87.  
  88.       
  89.       (*---> # 2 parameter *) (* Indent *)
  90.       
  91.       SysIndentNum := 0;
  92.       Repeat
  93.          
  94.          (* since, indent procedure does not accept 0, use it for flag. *)
  95.          SysIndentNum := 0;
  96.          
  97.          gotoxy(03,10);
  98.          writeln('Left Margin Indent Tab Length > 0.');
  99.          gotoxy(03,11);
  100.          write('   Enter IndentNum, <CR> = 3 : ');
  101.          readln(SysIndentNum);
  102.          
  103.          (* accept <CR> entry as default #3 *)
  104.          (* if no entry, they int.var unchanged *)
  105.          if (SysIndentNum < 1) then SysIndentNum := 3;
  106.          
  107.       Until (SysIndentNum > 0) and (SysIndentNum < 80);
  108.       
  109.       SysIndent := true;
  110.       SysIndentPos := 0;
  111.       
  112.       
  113.       (*---> #3 parameter *) (* Comment *)
  114.       
  115.       gotoxy(03,12);
  116.       writeln('Comment Lines to be Included.');
  117.       gotoxy(03,13);
  118.       write('   Enter <Y/N> <CR=Y> : ');
  119.       readln(SysCharEntry);
  120.       
  121.       SysComment := true ; (* default *)
  122.       
  123.       IF (length(SysCharEntry) > 0)
  124.       then
  125.       IF (upcase(SysCharEntry) = 'N')
  126.       then
  127.       SysComment := false;
  128.       
  129.       
  130.       (*---> #4 parameter *) (* LineCnt *)
  131.       
  132.       gotoxy(03,14);
  133.       writeln('Line Counter.');
  134.       gotoxy(03,15);
  135.       write('   Enter <Y/N> <CR=N> : ');
  136.       readln(SysCharEntry);
  137.       
  138.       SysLineCnt := false; (* default *)
  139.       SysLenMax := 79;
  140.       
  141.       IF (length(SysCharEntry) > 0)
  142.       then
  143.       IF (upcase(SysCharEntry) = 'Y')
  144.       then
  145.       begin
  146.          SysLineCnt := true;
  147.          SysLenMax  := 75;
  148.       end;
  149.       
  150.       
  151.       (*---> #5 parameter *) (* Vertiate *)
  152.       
  153.       gotoxy(03,16);
  154.       writeln('Vertical Line Connections.');
  155.       gotoxy(03,17);
  156.       write('   Enter <Y/N> <CR=N> : ');
  157.       readln(SysCharEntry);
  158.       
  159.       SysVertiate := false; (* default *)
  160.       
  161.       IF (length(SysCharEntry) > 0) then
  162.       IF (upcase(SysCharEntry) = 'Y') then SysVertiate := true;
  163.       
  164.       
  165.       (*---> #6 paramter *)  (* Tracer *)
  166.       
  167.       gotoxy(03,18);
  168.       writeln('Special Programmer Tracer Displays.');
  169.       gotoxy(03,19);
  170.       write('   Enter (Y/N) <CR=N> : ');
  171.       readln(SysCharEntry);
  172.       
  173.       SysPgmTrace := false; (* default *)
  174.       
  175.       IF (length(SysCharEntry) > 0) then
  176.       IF (upcase(SysCharEntry) = 'Y') then SysPgmTrace := true;
  177.       
  178.       (*---> #7 paramter *)  (* PgmMod *)
  179.  
  180.       gotoxy(03,20);
  181.       writeln('Force the System Pgm Mode : <DB> <TP>');
  182.       gotoxy(03,21);
  183.       write  ('Enter selection, <CR> = normal parse : ');
  184.       readln(SysPgmMod);
  185.       
  186.       IF (length(SysPgmMod) > 0) then
  187.       begin
  188.          case (upcase(SysPgmMod[1])) of
  189.             'D' : SysPgmMod := 'DB';
  190.             'T' : SysPgmMod := 'TP';
  191.             else
  192.             begin
  193.                gotoxy(03,21);
  194.                writeln(' Unknown : defaulted to normal.          ');
  195.                SysPgmMod := '  ';
  196.             end;
  197.          end;
  198.       end
  199.       else
  200.       begin
  201.          gotoxy(03,21);
  202.          writeln(' Defaulted to normal');
  203.          SysPgmMod := '  ';
  204.          pDelay1;
  205.       end;
  206.  
  207.       gotoxy(03,22);
  208.       writeln(' SysPgmMod = :',SysPgmMod,':');
  209.       if SysPgmMod = '  ' then writeln('Filename.TYP Parse enabled');
  210.  
  211.    end;  (* IF (SysCmdUser) and (SysCmdUserParm) then (* fetch them *)
  212.  
  213.    writeln;
  214.  
  215.    writeln('--------------------------------------');
  216.    writeln;
  217.    pDelay2;
  218.  
  219. end; (* INCLUDE *)
  220.  
  221. (*******************************************************************)
  222. (*<<<>>>*)